package com.yungu.swift.system.sys.model.vo;

import com.yungu.swift.base.model.BaseVo;
import com.yungu.swift.constants.CommonConstant;
import com.yungu.swift.system.sys.model.dto.SysCityDto;

import java.util.List;

/**
 * @author Zerrion
 * @date 2019/2/28
 * 组织机构的业务bean
 */
public class BusinessVo extends BaseVo {

    /**
     * 业务名称
     */
    private String name;
    /**
     * 业务类型 1 出租车，2 专车，3 跨城拼车
     */
    private Integer type;

    /**
     * 组织机构uuid
     */
    private String organizationUuid;
    /**
     * 资源集合
     */
    private String resource;
    /**
     * 抽成
     */
    private Double commission;
    /**
     * 抽成方式抽成类型（1：百分比 2：抽成固定金额）
     */
    private Integer commissionType;
    /**
     * 附加费
     */
    private Double additionalFee;
    /**
     * 等级类型（1：app运营商 2：区域代理 3：公司）
     */
    private Integer level;
    /**
     * 业务英文名字
     */
    private String engName;

    /**
     * 业务对应的开通城市
     */
    private List<SysCityDto> businessCityDtoList;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getOrganizationUuid() {
        return organizationUuid;
    }

    public void setOrganizationUuid(String organizationUuid) {
        this.organizationUuid = organizationUuid;
    }

    public String getResource() {
        return resource;
    }

    public void setResource(String resource) {
        this.resource = resource;
    }

    public Double getCommission() {
        return commission;
    }

    public void setCommission(Double commission) {
        this.commission = commission;
    }

    public Integer getCommissionType() {
        return commissionType;
    }

    public void setCommissionType(Integer commissionType) {
        this.commissionType = commissionType;
    }

    public Double getAdditionalFee() {
        return additionalFee;
    }

    public void setAdditionalFee(Double additionalFee) {
        this.additionalFee = additionalFee;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public String getEngName() {
        switch (getType()) {
            case CommonConstant.BUSINESS_TYPE_TAXI: {
                return "taxi";
            }
            case CommonConstant.BUSINESS_TYPE_SPEC: {
                return "special";
            }
            case CommonConstant.BUSINESS_TYPE_POOL: {
                return "join";
            }
            case CommonConstant.BUSINESS_TYPE_EXPRESS: {
                return "express";
            }
            case CommonConstant.BUSINESS_TYPE_PARCEL: {
                return "parcel";
            }
            default: {
                return "error";
            }

        }
    }

    public void setEngName(String engName) {
        this.engName = engName;
    }

    public List<SysCityDto> getBusinessCityDtoList() {
        return businessCityDtoList;
    }

    public void setBusinessCityDtoList(List<SysCityDto> businessCityDtoList) {
        this.businessCityDtoList = businessCityDtoList;
    }
}
